﻿using Domain.Entitys;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configers
{
    public class GroupMenuConfigure : IEntityTypeConfiguration<GroupMenu>
    {
        public void Configure(EntityTypeBuilder<GroupMenu> builder)
        {
            builder.ToTable(nameof(GroupMenu));
            builder.HasKey(gm => gm.GroupID);
            builder.Property(gm => gm.GroupName).IsRequired(false).HasMaxLength(50);
        }
    }
}